using MicroMsgBackground.Protocol;
using System;
using System.Collections.Generic;
namespace MicroMsgBackground.Network
{
	public class CmdFunc
	{
		public const string CMDURI_AUTH_REQ = "/cgi-bin/micromsg-bin/auth";
		public const string CMDURI_SENDMSG_REQ = "/cgi-bin/micromsg-bin/sendmsg";
		public const string CMDURI_SYNC_REQ = "/cgi-bin/micromsg-bin/sync";
		public const string CMDURI_UPLOADMSGIMG_REQ = "/cgi-bin/micromsg-bin/uploadmsgimg";
		public const string CMDURI_GETMSGIMG_REQ = "/cgi-bin/micromsg-bin/getmsgimg";
		public const string CMDURI_INIT_REQ = "/cgi-bin/micromsg-bin/init";
		public const string CMDURI_GETUPDATEPACK_REQ = "/cgi-bin/micromsg-bin/getupdatepack";
		public const string CMDURI_SEARCHFRIEND_REQ = "/cgi-bin/micromsg-bin/searchfriend";
		public const string CMDURI_GETINVITEFRIEND_REQ = "/cgi-bin/micromsg-bin/getinvitefriend";
		public const string CMDURI_UPLOADVOICE_REQ = "/cgi-bin/micromsg-bin/uploadvoice";
		public const string CMDURI_DOWNLOADVOICE_REQ = "/cgi-bin/micromsg-bin/downloadvoice";
		public const string CMDURI_NEWINIT_REQ = "/cgi-bin/micromsg-bin/newinit";
		public const string CMDURI_NEWSYNC_REQ = "/cgi-bin/micromsg-bin/newsync";
		public const string CMDURI_NEWREG_REQ = "/cgi-bin/micromsg-bin/newreg";
		public const string CMDURI_GETUSERNAME_REQ = "/cgi-bin/micromsg-bin/getusername";
		public const string CMDURI_BATCHGETCONTACTPROFILE_REQ = "/cgi-bin/micromsg-bin/batchgetcontactprofile";
		public const string CMDURI_GETUSERIMG_REQ = "/cgi-bin/micromsg-bin/batchgetheadimg";
		public const string CMDURI_GETUPDATEINFO_REQ = "/cgi-bin/micromsg-bin/getupdateinfo";
		public const string CMDURI_ADDCHATROOMMEMBER_REQ = "/cgi-bin/micromsg-bin/addchatroommember";
		public const string CMDURI_CREATECHATROOM_REQ = "/cgi-bin/micromsg-bin/createchatroom";
		public const string CMDURI_GETVERIFYIMG_REQ = "/cgi-bin/micromsg-bin/getverifyimg";
		public const string CMDURI_GETQQGROUP_REQ = "/cgi-bin/micromsg-bin/getqqgroup";
		public const string CMDURI_VERIFYUSER = "/cgi-bin/micromsg-bin/verifyuser";
		public const string CMDURI_SEARCHCONTACT_REQ = "/cgi-bin/micromsg-bin/searchcontact";
		public const string CMDURI_SENDCARD_REQ = "/cgi-bin/micromsg-bin/sendcard";
		public const string CMDURI_SENDINVITEMAIL_REQ = "/cgi-bin/micromsg-bin/sendinvitemail";
		public const string CMDURI_UPLOADVIDEO_REQ = "/cgi-bin/micromsg-bin/uploadvideo";
		public const string CMDURI_DOWNLOADVIDEO_REQ = "/cgi-bin/micromsg-bin/downloadvideo";
		public const string CMDURI_SHAKEREPORT_REQ = "/cgi-bin/micromsg-bin/shakereport";
		public const string CMDURI_SHAKEGET_REQ = "/cgi-bin/micromsg-bin/shakeget";
		public const string CMDURI_EXPOSE_REQ = "/cgi-bin/micromsg-bin/expose";
		public const string CMDURI_GENERALSET_REQ = "/cgi-bin/micromsg-bin/generalset";
		public const string CMDURI_MASS_SEND_REQ = "/cgi-bin/micromsg-bin/masssend";
		public const string CMDURI_GETVUSERINFO_REQ = "/cgi-bin/micromsg-bin/getvuserinfo";
		public const string CMDURI_GETCONTACT_REQ = "/cgi-bin/micromsg-bin/getcontact";
		public const string CMDURI_GET_QRCODE_REQ = "/cgi-bin/micromsg-bin/getqrcode";
		public const string CMDURI_SNS_TIME_LINE_REQ = "/cgi-bin/micromsg-bin/snstimeline";
		public const string CMDURI_SNS_USER_PAGE_REQ = "/cgi-bin/micromsg-bin/snsuserpage";
		public const string CMDURI_SNS_UPLOAD_REQ = "/cgi-bin/micromsg-bin/snsupload";
		public const string CMDURI_SNS_POST_REQ = "/cgi-bin/micromsg-bin/snspost";
		public const string CMDURI_SNS_SYNC_REQ = "/cgi-bin/micromsg-bin/snssync";
		public const string CMDURI_SNS_OBJECT_OP_REQ = "/cgi-bin/micromsg-bin/snsobjectop";
		public const string CMDURI_SNS_COMMENT_REQ = "/cgi-bin/micromsg-bin/snscomment";
		public const string CMDURI_SNS_OBJECTDETAIL_REQ = "/cgi-bin/micromsg-bin/snsobjectdetail";
		public const string CMDURI_BINDOP_MOBILE_FOR_REG = "/cgi-bin/micromsg-bin/bindopmobileforreg";
		public const string CMDURI_BINDOP_MOBILE = "/cgi-bin/micromsg-bin/bindopmobile";
		public const string CMDURI_RESET_PWD_URL = "/cgi-bin/micromsg-bin/getresetpwdurl";
		public const string CMDURI_BINDQQ_URL = "/cgi-bin/micromsg-bin/bindqq";
		public const string CMDURI_LBSFIND_URL = "/cgi-bin/micromsg-bin/lbsfind";
		public const string CMDURI_ADDGROUP_URL = "/cgi-bin/micromsg-bin/addgroupcard";
		public const string CMDURI_UPLOAD_HEADIMG_URL = "/cgi-bin/micromsg-bin/uploadhdheadimg";
		public const string CMDURI_DOWNLOAD_HEADIMG_URL = "/cgi-bin/micromsg-bin/gethdheadimg";
		public const string CMDURI_FEED_BACK_URL = "/cgi-bin/micromsg-bin/sendfeedback";
		public const string CMDURI_PUSHCHANNEL_REG_URL = "/cgi-bin/micromsg-bin/winphonereg";
		public const string CMDURI_PUSHCHANNEL_UNREG_URL = "/cgi-bin/micromsg-bin/winphoneunreg";
		public const string CMDURI_SHAKE_IMG_URL = "/cgi-bin/micromsg-bin/shakeimg";
		public const string CMDURI_GET_BOTTLE_COUNT = "/cgi-bin/micromsg-bin/getbottlecount";
		public const string CMDURI_OPEN_BOTTLE = "/cgi-bin/micromsg-bin/openbottle";
		public const string CMDURI_PICK_BOTTLE = "/cgi-bin/micromsg-bin/pickbottle";
		public const string CMDURI_THROW_BOTTLE = "/cgi-bin/micromsg-bin/throwbottle";
		public const string CMDURI_DEL_BOTTLE = "/cgi-bin/micromsg-bin/deletebottle";
		public const string CMDURI_GET_PSM_IMG_URL = "/cgi-bin/micromsg-bin/getpsmimg";
		public const string CMDURI_GETPACKAGELIST_URL = "/cgi-bin/micromsg-bin/getpackagelist";
		public const string CMDURI_GETMFRIEND_URL = "/cgi-bin/micromsg-bin/getmfriend";
		public const string CMDURI_UPLOADMCONTACT_URL = "/cgi-bin/micromsg-bin/uploadmcontact";
		public const string CMDURI_FACEBOOK_AUTH_URL = "/cgi-bin/micromsg-bin/facebookauth";
		public const string CMDURI_DOWNLOAD_PACKAGE_URL = "/cgi-bin/micromsg-bin/downloadpackage";
		private static Dictionary<int, MMFuncConst> mapMMFunc;
		public static MMFuncConst getMMFuncByCGI(string cgiName)
		{
			if (string.IsNullOrEmpty(cgiName))
			{
				return MMFuncConst.MMFunc_Default;
			}
			CmdFunc.checkMMFuncMap();
			int hashCode = cgiName.GetHashCode();
			if (CmdFunc.mapMMFunc.ContainsKey(hashCode))
			{
				return CmdFunc.mapMMFunc.get_Item(hashCode);
			}
			return MMFuncConst.MMFunc_Default;
		}
		private static void AddItem(string string_0, MMFuncConst func)
		{
			CmdFunc.mapMMFunc.Add(string_0.GetHashCode(), func);
		}
		private static void checkMMFuncMap()
		{
			if (CmdFunc.mapMMFunc != null)
			{
				return;
			}
			CmdFunc.mapMMFunc = new Dictionary<int, MMFuncConst>();
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/auth", MMFuncConst.MMFunc_Auth);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/sendmsg", MMFuncConst.MMFunc_SendMsg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/sync", MMFuncConst.MMFunc_Sync);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/uploadmsgimg", MMFuncConst.MMFunc_UploadMsgImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getmsgimg", MMFuncConst.MMFunc_GetMsgImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/init", MMFuncConst.MMFunc_Init);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getupdatepack", MMFuncConst.MMFunc_GetUpdatePack);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/searchfriend", MMFuncConst.MMFunc_SearchFriend);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getinvitefriend", MMFuncConst.MMFunc_GetInviteFriend);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/uploadvoice", MMFuncConst.MMFunc_UploadVoice);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/downloadvoice", MMFuncConst.MMFunc_DownloadVoice);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/newinit", MMFuncConst.MMFunc_NewInit);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/newsync", MMFuncConst.MMFunc_NewSync);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/newreg", MMFuncConst.MMFunc_NewReg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getusername", MMFuncConst.MMFunc_GetUserName);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/batchgetcontactprofile", MMFuncConst.MMFunc_BatchGetContactProfile);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/batchgetheadimg", MMFuncConst.MMFunc_BatchGetHeadImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getupdateinfo", MMFuncConst.MMFunc_GetUpdateInfo);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/addchatroommember", MMFuncConst.MMFunc_AddChatRoomMember);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/createchatroom", MMFuncConst.MMFunc_CreateChatRoom);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getverifyimg", MMFuncConst.MMFunc_GetVerifyImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getqqgroup", MMFuncConst.MMFunc_GetQQGroup);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/verifyuser", MMFuncConst.MMFunc_VerifyUser);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/searchcontact", MMFuncConst.MMFunc_SearchContact);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/sendcard", MMFuncConst.MMFunc_SendCard);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/sendinvitemail", MMFuncConst.MMFunc_SendInviteEmail);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/uploadvideo", MMFuncConst.MMFunc_UploadVideo);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/downloadvideo", MMFuncConst.MMFunc_DownloadVideo);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/shakereport", MMFuncConst.MMFunc_ShakeReport);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/shakeget", MMFuncConst.MMFunc_ShakeGet);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/expose", MMFuncConst.MMFunc_Expose);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/generalset", MMFuncConst.MMFunc_GeneralSet);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/masssend", MMFuncConst.MMFunc_MassSend);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getvuserinfo", MMFuncConst.MMFunc_GetVUserInfo);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/bindopmobileforreg", MMFuncConst.MMFunc_BindMobileForReg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/bindopmobile", MMFuncConst.MMFunc_BindOpMobile);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getresetpwdurl", MMFuncConst.MMFunc_GetResetPwdUrl);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/bindqq", MMFuncConst.MMFunc_BindQQ);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/lbsfind", MMFuncConst.MMFunc_LbsFind);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/addgroupcard", MMFuncConst.MMFunc_AddGroupCard);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/uploadhdheadimg", MMFuncConst.MMFunc_UploadHDHeadImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/gethdheadimg", MMFuncConst.MMFunc_GetHDHeadImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/sendfeedback", MMFuncConst.MMFunc_SendFeedback);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/winphonereg", MMFuncConst.MMFunc_WinphoneReg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/winphoneunreg", MMFuncConst.MMFunc_WinphoneUnReg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/shakeimg", MMFuncConst.MMFunc_ShakeImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getbottlecount", MMFuncConst.MMFunc_GetBottleCount);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/openbottle", MMFuncConst.MMFunc_OpenBottle);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/pickbottle", MMFuncConst.MMFunc_PickBottle);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/throwbottle", MMFuncConst.MMFunc_ThrowBottle);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getpsmimg", MMFuncConst.MMFunc_GetPSMImg);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getpackagelist", MMFuncConst.MMFunc_GetPackageList);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/downloadpackage", MMFuncConst.MMFunc_DownloadPackageList);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getmfriend", MMFuncConst.MMFunc_GetMFriend);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/uploadmcontact", MMFuncConst.MMFunc_UploadMContact);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getcontact", MMFuncConst.MMFunc_GetContact);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/facebookauth", MMFuncConst.MMFunc_FaceBookAuth);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/getqrcode", MMFuncConst.MMFunc_GetQRCode);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snstimeline", MMFuncConst.MMFunc_MMSnsTimeLine);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snsuserpage", MMFuncConst.MMFunc_MMSnsUserPage);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snsupload", MMFuncConst.MMFunc_MMSnsUpload);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snspost", MMFuncConst.MMFunc_MMSnsPost);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snssync", MMFuncConst.MMFunc_MMSnsSync);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snsobjectop", MMFuncConst.MMFunc_MMSnsObjectOp);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snscomment", MMFuncConst.MMFunc_MMSnsComment);
			CmdFunc.AddItem("/cgi-bin/micromsg-bin/snsobjectdetail", MMFuncConst.MMFunc_MMSnsObjectDetail);
		}
		public static string getUriByCmdID(int cmdID)
		{
			if (cmdID <= 71)
			{
				switch (cmdID)
				{
				case 1:
					return "/cgi-bin/micromsg-bin/auth";
				case 2:
					return "/cgi-bin/micromsg-bin/sendmsg";
				case 3:
					return "/cgi-bin/micromsg-bin/sync";
				case 4:
				case 5:
				case 6:
				case 7:
				case 8:
				case 11:
				case 12:
				case 13:
				case 21:
				case 22:
				case 23:
				case 24:
				case 25:
				case 29:
				case 30:
				case 31:
				case 43:
				case 45:
				case 46:
				case 47:
				case 49:
				case 50:
				case 51:
				case 52:
				case 53:
				case 54:
				case 55:
				case 58:
					break;
				case 9:
					return "/cgi-bin/micromsg-bin/uploadmsgimg";
				case 10:
					return "/cgi-bin/micromsg-bin/getmsgimg";
				case 14:
					return "/cgi-bin/micromsg-bin/init";
				case 15:
					return "/cgi-bin/micromsg-bin/batchgetheadimg";
				case 16:
					return "/cgi-bin/micromsg-bin/getupdatepack";
				case 17:
					return "/cgi-bin/micromsg-bin/searchfriend";
				case 18:
					return "/cgi-bin/micromsg-bin/getinvitefriend";
				case 19:
					return "/cgi-bin/micromsg-bin/uploadvoice";
				case 20:
					return "/cgi-bin/micromsg-bin/downloadvoice";
				case 26:
					return "/cgi-bin/micromsg-bin/newsync";
				case 27:
					return "/cgi-bin/micromsg-bin/newinit";
				case 28:
					return "/cgi-bin/micromsg-bin/batchgetcontactprofile";
				case 32:
					return "/cgi-bin/micromsg-bin/newreg";
				case 33:
					return "/cgi-bin/micromsg-bin/getusername";
				case 34:
					return "/cgi-bin/micromsg-bin/searchcontact";
				case 35:
					return "/cgi-bin/micromsg-bin/getupdateinfo";
				case 36:
					return "/cgi-bin/micromsg-bin/addchatroommember";
				case 37:
					return "/cgi-bin/micromsg-bin/createchatroom";
				case 38:
					return "/cgi-bin/micromsg-bin/getqqgroup";
				case 39:
					return "/cgi-bin/micromsg-bin/uploadvideo";
				case 40:
					return "/cgi-bin/micromsg-bin/downloadvideo";
				case 41:
					return "/cgi-bin/micromsg-bin/sendinvitemail";
				case 42:
					return "/cgi-bin/micromsg-bin/sendcard";
				case 44:
					return "/cgi-bin/micromsg-bin/verifyuser";
				case 48:
					return "/cgi-bin/micromsg-bin/getverifyimg";
				case 56:
					return "/cgi-bin/micromsg-bin/shakereport";
				case 57:
					return "/cgi-bin/micromsg-bin/shakeget";
				case 59:
					return "/cgi-bin/micromsg-bin/expose";
				case 60:
					return "/cgi-bin/micromsg-bin/getvuserinfo";
				default:
					switch (cmdID)
					{
					case 67:
						return "/cgi-bin/micromsg-bin/getqrcode";
					case 70:
						return "/cgi-bin/micromsg-bin/generalset";
					case 71:
						return "/cgi-bin/micromsg-bin/getcontact";
					}
					break;
				}
			}
			else
			{
				if (cmdID == 84)
				{
					return "/cgi-bin/micromsg-bin/masssend";
				}
				switch (cmdID)
				{
				case 95:
					return "/cgi-bin/micromsg-bin/snsupload";
				case 97:
					return "/cgi-bin/micromsg-bin/snspost";
				case 98:
					return "/cgi-bin/micromsg-bin/snstimeline";
				case 99:
					return "/cgi-bin/micromsg-bin/snsuserpage";
				case 100:
					return "/cgi-bin/micromsg-bin/snscomment";
				case 101:
					return "/cgi-bin/micromsg-bin/snsobjectdetail";
				case 102:
					return "/cgi-bin/micromsg-bin/snssync";
				case 104:
					return "/cgi-bin/micromsg-bin/snsobjectop";
				}
			}
			return "";
		}
	}
}
